package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.Product;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ProductMapper extends BaseMapper<Product> {
    @Select("select * from product ")
    public List<Product>findAll();

    @Insert("insert into product(uid,p_name,price,description,c_id,clock) values(#{uid},#{pName},#{price},#{description},#{cId},#{clock})")
    public int InsertProduct(Product product);

}
